home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Web Graphics with Shout 3D
/
Interactive Web Graphics With Shout 3D.iso
/
pc
/
Code
/
Chapter03
/
twoboxes.wrl
< prev
Wrap
Text File
|
2000-06-23
|
1KB
|
69 lines
#VRML V2.0 utf8
DEF PARENT Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 1 0 0
}
}
geometry IndexedFaceSet {
coord Coordinate {
point [ -1 1 1,
-1 -1 1,
1 1 1,
1 -1 1,
1 1 -1,
1 -1 -1,
-1 1 -1,
-1 -1 -1 ]
}
coordIndex [ 0, 1, 3, 2, -1, 4, 5, 7,
6, -1, 6, 7, 1, 0, -1, 2,
3, 5, 4, -1, 6, 0, 2, 4,
-1, 1, 7, 5, 3, -1 ]
} #end Parent IndexedFaceSet
} #end of Parent Shape
DEF CHILD Transform {
translation 2.5 0 0
children Shape {
appearance Appearance {
material Material {
diffuseColor 0 0 1
}
}
geometry IndexedFaceSet {
coord Coordinate {
point [ -1 1 1,
-1 -1 1,
1 1 1,
1 -1 1,
1 1 -1,
1 -1 -1,
-1 1 -1,
-1 -1 -1 ]
}
coordIndex [ 0, 1, 3, 2, -1, 4, 5, 7,
6, -1, 6, 7, 1, 0, -1, 2,
3, 5, 4, -1, 6, 0, 2, 4,
-1, 1, 7, 5, 3, -1 ]
} #end Child IndexedFaceSet
} #end of Child Shape
} #end of Child Transform
]#end of Children of Parent Transform
} #end of Parent Transform